package com.design.singleton;

/**
 * 懒汉模式（线程不安全）
 * @author ytj
 * @date 2024/11/27 15:17
 */
public class Singleton1 {

    private static Singleton1 singleton1;

    private Singleton1(){}

    public static Singleton1 getSingleton1(){
        if(singleton1==null){
            return new Singleton1();
        }
        return singleton1;
    }
}
